package sky.treasure;

import sky.treasure.properties.IProperty;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Gauss
 * Date: 05.01.14
 * Time: 16:05
 * To change this template use File | Settings | File Templates.
 */
public class Cell {

    private Coordinates coordinates;
    private boolean isAbroad = false;
    private boolean canMove = true;
    private ArrayList<IProperty> properties;

    public Cell(Coordinates coordinates) {
        this.coordinates = coordinates;
    }

    public boolean isAbroad() {
        return isAbroad;
    }

    public void setAbroad(boolean abroad) {
        isAbroad = abroad;
    }

    public ArrayList<IProperty> getProperties() {
        return properties;
    }

    public void setProperties(ArrayList<IProperty> properties) {
        this.properties = properties;
    }

    public void addProperty(IProperty property) {
        if (properties==null) {
            properties = new ArrayList<IProperty>();
        }
        properties.add(property);
    }

    public void setCoordinates(Coordinates coordinates) {
        this.coordinates = coordinates;
    }

    public Coordinates getCoordinates() {
        return coordinates;
    }

    public boolean isCanMove() {
        return canMove;
    }

    public void setCanMove(boolean canMove) {
        this.canMove = canMove;
    }
}
